Conversation
novag
commented
Apr 27, 2025
- The previous aiomqtt implementation was unreliable: when the MQTT broker closed the connection, the client often failed to auto-reconnect as expected.
- This change removes the aiomqtt wrapper and switches to using paho-mqtt directly.
- The new implementation has been running for two weeks with no issues.
|
The new implementation could block processing of messages, so add another source for instability. When using a dedicated thread (which paho-mqtt does with So overall I would prefer a aiomqtt implementation, it should already do all that heavy lifting. Any information on the issues you experienced with aiomqtt? Are you sure that it was related to aiomqtt and not paho-mqtt itself? In the long run (even more so when we plan to extend proxy to sending and receive) it might be better invested time to fix aiomqtt instead of re-implementing part of the async wrapper logic. |